<div class="al-modal-view">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" ng-click="cancel()">
      <span aria-hidden="true" class="glyphicon glyphicon-remove"></span>
      <span class="sr-only">Close</span>
    </button>
    <h4 class="modal-title ok-color">{{modalTitle}}</h4>
  </div>
  <div class="modal-body">
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group">
          <label class="col-sm-3 control-label">角色名称<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.name" type="text"
                   ng-required="true" name="roleName"
                   placeholder="" maxlength="50"/>
            <div class="help-block with-errors"
                 ng-if="modalForm.roleName.$invalid && !modalForm.roleName.$pristine">
              角色名称
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">角色描述</label>
          <div class="col-sm-8">
            <textarea class="form-control" ng-model="data.description" rows="3" placeholder=""></textarea>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">角色类型</label>
          <div class="col-sm-8">
            <span class="ui-select">
              <select ng-model="data.type"
                      ng-options="option.value as option.name for option in modalTypeList"></select>
            </span>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-3 control-label">状态</label>
          <div class="col-sm-8">
            <nobr>
              <label class="ui-radio" ng-repeat="option in modalEnableList">
                <input name="status" ng-value="option.value" type="radio" ng-model="data.enabled">
                <span>{{option.name}}</span>
              </label>
            </nobr>
          </div>
        </div>
      </ng-form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-warning no-border" type="button" ng-click="cancel()">取消</button>
    <button class="btn btn-primary no-border" type="button" ng-click="confirm()" ng-disabled="modalForm.$invalid">确定</button>
  </div>
</div>